package com.example.zbh.lessona.duckdemo;

/**
 * Created by zbh on 15/11/18.
 */
public class RedHeadDuck extends Duck {
    public RedHeadDuck() {
        flyBehavior = new FlyWithWing();
        quackBehavior = new Quack();
    }

    @Override
    void swim() {


    }

    @Override
    void diplay() {
        System.out.print("红头鸭");
    }

    @Override
    void perform() {


    }

    @Override
    void setFlyBehavior() {
        flyBehavior.fly();
    }

    @Override
    void setQuackBehavior() {
        quackBehavior.quack();
    }
}
